package com.dgut.shopManage.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.dgut.common.util.Xtype;
import com.fasterxml.jackson.annotation.JsonFormat;


@Entity
@Table(name="t_merchant")
public class Merchant {

	private Long mid;
	private String shopName;
	private String merchantName;
	private String telephone;
	private Xtype xtype;		//经营类型
	private Date sRentTime;    //租用开始时间
	private Date eRentTime;    //租用结束时间
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getMid() {
		return mid;
	}
	public String getShopName() {
		return shopName;
	}
	public String getMerchantName() {
		return merchantName;
	}
	public String getTelephone() {
		return telephone;
	}
	public Xtype getXtype() {
		return xtype;
	}
	@JsonFormat(pattern = "yyyy/MM/dd")
	public Date getsRentTime() {
		return sRentTime;
	}
	@JsonFormat(pattern = "yyyy/MM/dd")
	public Date geteRentTime() {
		return eRentTime;
	}
	
	public void setShopName(String shopName) {
		this.shopName = shopName;
	}
	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public void setXtype(Xtype xtype) {
		this.xtype = xtype;
	}
	public void setsRentTime(Date sRentTime) {
		this.sRentTime = sRentTime;
	}
	public void seteRentTime(Date eRentTime) {
		this.eRentTime = eRentTime;
	}
	public void setMid(Long mid) {
		this.mid = mid;
	}
	@Override
	public String toString() {
		return "Merchant [shopName=" + shopName + ", merchantName=" + merchantName + ", telephone=" + telephone
				+ ", xtype=" + xtype + ", sRentTime=" + sRentTime + ", eRentTime=" + eRentTime + "]";
	}
	
}
